//引入二次封装axios
import request from '@/utils/request'

export const reqTrademarkList = (page,limit)=>request({url:`/admin/product/baseTrademark/${page}/${limit}`,method:'get'});

export const reqAddOrUpdateTrademark = (data) => {
  //data:请求体携带参数
  //区分是添加|修改，通过携带的参数是否有ID
  if (data.id) {
    //修改
    return request({ url: `/admin/product/baseTrademark/update`, method: 'put', data })
  } else {
    //新增
    return request({ url: `/admin/product/baseTrademark/save`, method: 'post', data })
  }

}

export const reqGetTrademarkInfo = (id) => request({ url: `/admin/product/baseTrademark/get/${id}`, method: 'get' });

export const reqRemoveTrademark = (id) => request({ url: `/admin/product/baseTrademark/remove/${id}`, method: 'delete' });
